//
//  VMCNavigationController.m
//  vmcshop
//
//  Created by bigknife on 14-10-10.
//  Copyright (c) 2014年 idongler. All rights reserved.
//

#import "VMCNavigationController.h"

@interface VMCNavigationController ()<UIGestureRecognizerDelegate>

@end

@implementation VMCNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    __weak VMCNavigationController *wself = self;
	
	//ios7 之后NavigationController除了左上角自带的返回上个界面的属性之外 添加了支持右划手势返回上一级的属性 但是NavigationController要遵守这个手势协议 并设置代理  具体参考http://www.tuicool.com/articles/vMfAVv
	
    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
        self.interactivePopGestureRecognizer.delegate = wself;
    }
}
-(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{
    if ([self.childViewControllers count] == 1) {
        return NO;
    }
    return YES;
}
@end
